package cn.janescott.feigncustom.configuration;

import feign.Contract;
import feign.Logger;
import feign.Request;
import org.springframework.cloud.openfeign.support.SpringMvcContract;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author scott
 * @date 2019/1/4
 */
@Configuration
public class FeignConfiguration {

    @Bean
    Logger.Level feignLevel() {
        return Logger.Level.FULL;
    }

    @Bean
    public Contract feignContract() {
        return new SpringMvcContract();
    }

    @Bean
    public Request.Options options() {
        return new Request.Options(10 * 1000,50 * 1000);
    }

}
